import pyodbc
conn = pyodbc.connect(
    "DRIVER={SQL Server Native Client 10.0};"
    "SERVER=192.140.174.242,1433;"
    "DATABASE=dnmembership;"
    "UID=DragonNest;"
    "PWD=E6h7HsRXJbH8ays;"
)
print("连接成功！")